﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Threading.Tasks;

namespace Sino.CapacityCloud.Repositories.Models
{

    public class Location
    {

        [Key()]
        [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
        public string LocationId { get; set; }

        public string CarId { get; set; }

        public string UserId { get; set; }

        public string Address { get; set; }

        public double Longitude { get; set; }

        public double Latitude { get; set; }

        public DateTime Time { get; set; }

        public bool LocationStatus { get; set; }

        public virtual Car Car { get; set; }

        public virtual ApplicationUser User { get; set; }

        public Location()
        {
            this.LocationId = Guid.NewGuid().ToString();
        }

    }

}